package com.yunhe.merchants.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunhe.common.util.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName DataProjectCondition
 * @Description TODO
 * @Author HeTao
 * @Date 2021/5/10 15:43
 * @Version 1.0
 **/
@ApiModel("经理项目池/公共商机库筛选条件")
public class DataProjectCondition  implements Serializable {

    private static final long serialVersionUID = 3395146789445107487L;

    private List<String> ids;

    @ApiModelProperty(value = "关键字",required = false)
    private String keyWords;

    @ApiModelProperty(value = "企业行业",required = false)
    private String industryType;

    @ApiModelProperty(value = "来源",required = false)
    private String dataSource;

    @ApiModelProperty(value = "状态",required = false)
    private String projectStatus;

    @ApiModelProperty(value = "最后操作开始时间",required = false)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String operatingStartTime;

    @ApiModelProperty(value = "最后操作结束时间",required = false)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String operatingEndTime;

    @ApiModelProperty(value = "负责人",required = false)
    private Long principal;

    @ApiModelProperty(value = "负责部门",required = false)
    private Long responsibleDept;

    @ApiModelProperty(value = "排序",required = false,example = "asc 升序 desc降序")
    private String sortFlag = "desc";

    @ApiModelProperty(value = "数据类型",required = false,example = "01 经理项目池 02 公共商机库")
    private String dataType;

    @ApiModelProperty(value = "当前页码")
    private Integer page = 1;

    @ApiModelProperty(value = "页面条数")
    private Integer size = 10;

    @ApiModelProperty(value = "组织id",required = false,hidden = true)
    private List<Long> orgIds;

    private String industryCategorySelect;

    @ApiModelProperty(value = "是否删除",required = false,hidden = true)
    private String isDelete="0";

    private Long stationId;

    public String getIndustryCategorySelect() {
        return industryCategorySelect;
    }

    public Long getStationId() {
        return stationId;
    }

    public void setStationId(Long stationId) {
        this.stationId = stationId;
    }

    public void setIndustryCategorySelect(String industryCategorySelect) {
        if (!StringUtil.isEmpty(industryCategorySelect) && industryCategorySelect.endsWith("00")){
            this.industryCategorySelect = industryCategorySelect.substring(0,industryCategorySelect.lastIndexOf("00"));
        }else {
            this.industryCategorySelect = industryCategorySelect;
        }
    }

    public DataProjectCondition() {
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    public List<String> getIds() {
        return ids;
    }

    public void setIds(List<String> ids) {
        this.ids = ids;
    }

    public String getKeyWords() {
        return keyWords;
    }

    public void setKeyWords(String keyWords) {
        this.keyWords = keyWords;
    }

    public String getIndustryType() {
        return industryType;
    }

    public void setIndustryType(String industryType) {
        this.industryType = industryType;
        setIndustryCategorySelect(industryType);
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    public String getProjectStatus() {
        return projectStatus;
    }

    public void setProjectStatus(String projectStatus) {
        this.projectStatus = projectStatus;
    }

    public String getOperatingStartTime() {
        return operatingStartTime;
    }

    public void setOperatingStartTime(String operatingStartTime) {
        this.operatingStartTime = operatingStartTime;
    }

    public String getOperatingEndTime() {
        return operatingEndTime;
    }

    public void setOperatingEndTime(String operatingEndTime) {
        this.operatingEndTime = operatingEndTime;
    }

    public Long getPrincipal() {
        return principal;
    }

    public void setPrincipal(Long principal) {
        this.principal = principal;
    }

    public Long getResponsibleDept() {
        return responsibleDept;
    }

    public void setResponsibleDept(Long responsibleDept) {
        this.responsibleDept = responsibleDept;
    }

    public String getSortFlag() {
        return sortFlag;
    }

    public void setSortFlag(String sortFlag) {
        this.sortFlag = sortFlag;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public List<Long> getOrgIds() {
        return orgIds;
    }

    public void setOrgIds(List<Long> orgIds) {
        this.orgIds = orgIds;
    }
}
